// router/index.js
import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  // 映射关系: path -> component
  routes: [
    {
      path: '/',
      redirect: '/main',
    },
    {
      path: '/main',
      name: 'main',
      component: () => import('@/views/main/main.vue'),
    },
    {
      path: '/haplochromatization',
      name: 'haplochromatization',
      component: () => import('@/views/main/controls/haplochromatization/haplochromatization.vue'),
    },
    {
      path: '/roam',
      name: 'roam',
      component: () => import('@/views/main/controls/roam/roam.vue'),
    },
    {
      path: '/buffer',
      name: 'buffer',
      component: () => import('@/views/main/controls/buffer/buffer.vue'),
    },
    {
      path: '/settlement',
      name: 'settlement',
      component: () => import('@/views/main/controls/settlement/settlement.vue'),
    },
  ],
})

export default router
